home *** CD-ROM | disk | FTP | other *** search
MacBinary | 1994-04-01 | 6.3 KB | [TEXT/MPS ] |
open in:
MacOS 8.1
|
Win98
|
DOS
view JSON data
|
view as text
This file was processed as: MacBinary
(archive/macBinary).
You can browse this item here: icemalloc.h
Confidence | Program | Detection | Match Type | Support
|
---|
10%
| dexvert
| MacBinary (archive/macBinary)
| fallback
| Supported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| MacBinary II, inited, Fri Apr 1 18:20:58 1994, modified Fri Apr 1 18:20:58 1994, creator 'MPS ', type ASCII, 5690 bytes "icemalloc.h" , at 0x16ba 428 bytes resource
| default (weak)
| |
99%
| file
| data
| default
| |
74%
| TrID
| Macintosh plain text (MacBinary)
| default
| |
25%
| TrID
| MacBinary 2
| default (weak)
| |
100%
| siegfried
| fmt/1762 MacBinary (II)
| default
| |
100%
| lsar
| MacBinary
| default
|
|
id metadata |
---|
key | value |
---|
macFileType | [TEXT] |
macFileCreator | [MPS ] |
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 0b 69 63 65 6d 61 6c | 6c 6f 63 2e 68 00 00 00 |..icemal|loc.h...|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 4d 50 53 | 20 01 00 00 00 00 00 00 |.TEXTMPS| .......|
|00000050| 00 00 00 00 00 16 3a 00 | 00 01 ac a9 c2 5c da a9 |......:.|.....\..|
|00000060| c2 5c da 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |.\......|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 3c c9 00 00 |........|....<...|
|00000080| 0d 2f 2a 0d 2a 2a 0d 2a | 2a 20 4e 6f 74 69 63 65 |./*.**.*|* Notice|
|00000090| 2e 0d 2a 2a 0d 2a 2a 20 | 54 68 69 73 20 73 6f 75 |..**.** |This sou|
|000000a0| 72 63 65 20 63 6f 64 65 | 20 77 61 73 20 77 72 69 |rce code| was wri|
|000000b0| 74 74 65 6e 20 62 79 20 | 54 69 6d 20 45 6e 64 72 |tten by |Tim Endr|
|000000c0| 65 73 2e 20 74 69 6d 65 | 40 69 63 65 2e 63 6f 6d |es. time|@ice.com|
|000000d0| 0d 2a 2a 20 43 6f 70 79 | 72 69 67 68 74 20 31 39 |.** Copy|right 19|
|000000e0| 38 38 2d 31 39 39 31 20 | a9 20 42 79 20 54 69 6d |88-1991 |. By Tim|
|000000f0| 20 45 6e 64 72 65 73 2e | 20 41 6c 6c 20 72 69 67 | Endres.| All rig|
|00000100| 68 74 73 20 72 65 73 65 | 72 76 65 64 2e 0d 2a 2a |hts rese|rved..**|
|00000110| 0d 2a 2a 20 59 6f 75 20 | 6d 61 79 20 75 73 65 20 |.** You |may use |
|00000120| 74 68 69 73 20 73 6f 75 | 72 63 65 20 63 6f 64 65 |this sou|rce code|
|00000130| 20 66 6f 72 20 61 6e 79 | 20 70 75 72 70 6f 73 65 | for any| purpose|
|00000140| 20 79 6f 75 20 63 61 6e | 20 64 72 65 61 6d 0d 2a | you can| dream.*|
|00000150| 2a 20 6f 66 20 61 73 20 | 6c 6f 6e 67 20 61 73 20 |* of as |long as |
|00000160| 74 68 69 73 20 6e 6f 74 | 69 63 65 20 69 73 20 6e |this not|ice is n|
|00000170| 65 76 65 72 20 6d 6f 64 | 69 66 69 65 64 20 6e 6f |ever mod|ified no|
|00000180| 72 20 72 65 6d 6f 76 65 | 64 2e 0d 2a 2a 0d 2a 2f |r remove|d..**.*/|
|00000190| 0d 0d 23 69 6e 63 6c 75 | 64 65 20 3c 73 79 73 2f |..#inclu|de <sys/|
|000001a0| 74 79 70 65 73 2e 68 3e | 0d 0d 2f 2a 0d 2a 2a 20 |types.h>|../*.** |
|000001b0| 52 69 67 68 74 20 6e 6f | 77 20 77 65 20 61 72 65 |Right no|w we are|
|000001c0| 20 6c 69 6d 69 74 69 6e | 67 20 74 68 65 20 6d 61 | limitin|g the ma|
|000001d0| 78 69 6d 75 6d 20 73 69 | 6e 67 6c 65 20 61 6c 6c |ximum si|ngle all|
|000001e0| 6f 63 61 74 69 6f 6e 20 | 75 6e 69 74 20 74 6f 20 |ocation |unit to |
|000001f0| 31 36 4d 65 67 2e 0d 2a | 2a 20 54 68 69 73 20 77 |16Meg..*|* This w|
|00000200| 61 79 20 77 65 20 63 61 | 6e 20 73 74 75 66 66 20 |ay we ca|n stuff |
|00000210| 74 68 65 20 69 6e 64 65 | 78 20 74 6f 20 74 68 65 |the inde|x to the|
|00000220| 20 6e 65 78 74 20 70 74 | 72 20 68 64 72 20 69 6e | next pt|r hdr in|
|00000230| 74 6f 20 74 68 65 0d 2a | 2a 20 6c 6f 77 20 32 34 |to the.*|* low 24|
|00000240| 20 62 69 74 73 20 6f 66 | 20 61 20 6c 6f 6e 67 2c | bits of| a long,|
|00000250| 20 74 68 65 6e 20 73 6c | 61 6d 20 38 20 62 69 74 | then sl|am 8 bit|
|00000260| 73 20 6f 66 20 66 6c 61 | 67 20 69 6e 66 6f 72 6d |s of fla|g inform|
|00000270| 61 74 69 6f 6e 0d 2a 2a | 20 69 6e 74 6f 20 74 68 |ation.**| into th|
|00000280| 65 20 75 70 70 65 72 20 | 38 20 62 69 74 73 20 6f |e upper |8 bits o|
|00000290| 66 20 74 68 65 20 73 61 | 6d 65 20 6c 6f 6e 67 2e |f the sa|me long.|
|000002a0| 20 4e 6f 74 20 6e 65 63 | 65 73 73 61 72 69 6c 79 | Not nec|essarily|
|000002b0| 20 62 65 61 75 74 69 66 | 75 6c 0d 2a 2a 20 62 75 | beautif|ul.** bu|
|000002c0| 74 20 63 6f 6d 70 61 63 | 74 20 61 6e 64 20 66 75 |t compac|t and fu|
|000002d0| 6e 63 74 69 6f 6e 61 6c | 2e 0d 2a 2f 0d 0d 2f 2a |nctional|..*/../*|
|000002e0| 0d 2a 2a 09 5f 50 4d 5f | 44 45 42 55 47 5f 4c 45 |.**._PM_|DEBUG_LE|
|000002f0| 56 45 4c 0d 2a 2a 0d 2a | 2a 20 20 31 20 2d 20 44 |VEL.**.*|* 1 - D|
|00000300| 50 52 49 4e 54 46 20 45 | 52 52 4f 52 20 63 6f 6e |PRINTF E|RROR con|
|00000310| 64 69 74 69 6f 6e 73 2e | 0d 2a 2a 20 20 32 20 2d |ditions.|.** 2 -|
|00000320| 20 44 50 52 49 4e 54 46 | 20 2a 41 4e 44 2a 20 44 | DPRINTF| *AND* D|
|00000330| 41 43 54 49 4f 4e 20 45 | 52 52 4f 52 20 63 6f 6e |ACTION E|RROR con|
|00000340| 64 69 74 69 6f 6e 73 2e | 0d 2a 2a 0d 2a 2a 20 20 |ditions.|.**.** |
|00000350| 33 20 2d 20 44 50 52 49 | 4e 54 46 20 57 41 52 4e |3 - DPRI|NTF WARN|
|00000360| 49 4e 47 20 63 6f 6e 64 | 69 74 69 6f 6e 73 2e 0d |ING cond|itions..|
|00000370| 2a 2a 20 20 35 20 2d 20 | 44 50 52 49 4e 54 46 20 |** 5 - |DPRINTF |
|00000380| 44 45 42 55 47 49 4e 47 | 20 63 6f 6e 64 69 74 69 |DEBUGING| conditi|
|00000390| 6f 6e 73 2e 0d 2a 2a 20 | 31 30 20 2d 20 44 50 52 |ons..** |10 - DPR|
|000003a0| 49 4e 54 46 20 4e 4f 54 | 45 53 20 63 6f 6e 64 69 |INTF NOT|ES condi|
|000003b0| 74 69 6f 6e 73 2e 0d 2a | 2a 0d 2a 2f 0d 0d 23 69 |tions..*|*.*/..#i|
|000003c0| 66 64 65 66 20 44 45 42 | 55 47 0d 0d 23 09 64 65 |fdef DEB|UG..#.de|
|000003d0| 66 69 6e 65 20 5f 50 4d | 5f 53 54 41 54 53 0d 23 |fine _PM|_STATS.#|
|000003e0| 09 64 65 66 69 6e 65 20 | 5f 50 4d 5f 44 59 4e 41 |.define |_PM_DYNA|
|000003f0| 4d 49 43 5f 4d 45 52 47 | 49 4e 47 0d 23 09 64 65 |MIC_MERG|ING.#.de|
|00000400| 66 69 6e 65 20 5f 50 4d | 5f 44 59 4e 41 4d 49 43 |fine _PM|_DYNAMIC|
|00000410| 5f 46 52 45 45 0d 0d 23 | 09 64 65 66 69 6e 65 09 |_FREE..#|.define.|
|00000420| 5f 50 4d 5f 44 45 42 55 | 47 5f 4c 45 56 45 4c 09 |_PM_DEBU|G_LEVEL.|
|00000430| 09 31 0d 0d 23 09 64 65 | 66 69 6e 65 20 44 50 52 |.1..#.de|fine DPR|
|00000440| 49 4e 54 46 28 6c 65 76 | 65 6c 2c 20 70 61 72 6d |INTF(lev|el, parm|
|00000450| 73 29 09 7b 20 69 66 20 | 28 28 6c 65 76 65 6c 29 |s).{ if |((level)|
|00000460| 20 3c 3d 20 70 6f 6f 6c | 5f 6d 61 6c 6c 6f 63 5f | <= pool|_malloc_|
|00000470| 64 65 62 75 67 5f 6c 65 | 76 65 6c 29 20 7b 20 70 |debug_le|vel) { p|
|00000480| 72 69 6e 74 66 20 70 61 | 72 6d 73 20 3b 20 7d 20 |rintf pa|rms ; } |
|00000490| 7d 0d 23 09 64 65 66 69 | 6e 65 20 44 41 43 54 49 |}.#.defi|ne DACTI|
|000004a0| 4f 4e 28 6c 65 76 65 6c | 2c 20 61 63 74 69 6f 6e |ON(level|, action|
|000004b0| 29 09 7b 20 69 66 20 28 | 28 6c 65 76 65 6c 29 20 |).{ if (|(level) |
|000004c0| 3c 3d 20 70 6f 6f 6c 5f | 6d 61 6c 6c 6f 63 5f 64 |<= pool_|malloc_d|
|000004d0| 65 62 75 67 5f 6c 65 76 | 65 6c 29 20 7b 20 61 63 |ebug_lev|el) { ac|
|000004e0| 74 69 6f 6e 20 7d 20 7d | 0d 0d 69 6e 74 09 09 70 |tion } }|..int..p|
|000004f0| 6f 6f 6c 5f 6d 61 6c 6c | 6f 63 5f 64 65 62 75 67 |ool_mall|oc_debug|
|00000500| 5f 6c 65 76 65 6c 20 3d | 20 5f 50 4d 5f 44 45 42 |_level =| _PM_DEB|
|00000510| 55 47 5f 4c 45 56 45 4c | 3b 0d 0d 23 65 6c 73 65 |UG_LEVEL|;..#else|
|00000520| 0d 0d 23 09 64 65 66 69 | 6e 65 20 5f 50 4d 5f 44 |..#.defi|ne _PM_D|
|00000530| 59 4e 41 4d 49 43 5f 4d | 45 52 47 49 4e 47 0d 23 |YNAMIC_M|ERGING.#|
|00000540| 09 64 65 66 69 6e 65 20 | 5f 50 4d 5f 44 59 4e 41 |.define |_PM_DYNA|
|00000550| 4d 49 43 5f 46 52 45 45 | 0d 0d 23 09 64 65 66 69 |MIC_FREE|..#.defi|
|00000560| 6e 65 09 5f 50 4d 5f 44 | 45 42 55 47 5f 4c 45 56 |ne._PM_D|EBUG_LEV|
|00000570| 45 4c 09 09 30 0d 0d 23 | 09 64 65 66 69 6e 65 20 |EL..0..#|.define |
|00000580| 44 50 52 49 4e 54 46 28 | 6c 65 76 65 6c 2c 20 70 |DPRINTF(|level, p|
|00000590| 61 72 6d 73 29 0d 23 09 | 64 65 66 69 6e 65 20 44 |arms).#.|define D|
|000005a0| 41 43 54 49 4f 4e 28 6c | 65 76 65 6c 2c 20 61 63 |ACTION(l|evel, ac|
|000005b0| 74 69 6f 6e 29 0d 0d 23 | 65 6e 64 69 66 20 44 45 |tion)..#|endif DE|
|000005c0| 56 45 4c 4f 50 4d 45 4e | 54 0d 0d 0d 2f 2a 0d 2a |VELOPMEN|T.../*.*|
|000005d0| 2a 20 4d 45 4d 4f 52 59 | 20 50 54 52 20 48 45 41 |* MEMORY| PTR HEA|
|000005e0| 44 45 52 20 46 4c 41 47 | 20 42 49 54 53 3a 0d 2a |DER FLAG| BITS:.*|
|000005f0| 2a 0d 2a 2a 20 30 31 20 | 5f 50 4d 5f 50 54 52 5f |*.** 01 |_PM_PTR_|
|00000600| 46 52 45 45 09 09 49 73 | 20 74 68 69 73 20 70 69 |FREE..Is| this pi|
|00000610| 65 63 65 20 6f 66 20 6d | 65 6d 6f 72 79 20 66 72 |ece of m|emory fr|
|00000620| 65 65 3f 0d 2a 2a 20 30 | 32 0d 2a 2a 20 30 34 0d |ee?.** 0|2.** 04.|
|00000630| 2a 2a 20 30 38 0d 2a 2a | 0d 2a 2a 20 31 30 0d 2a |** 08.**|.** 10.*|
|00000640| 2a 20 32 30 0d 2a 2a 20 | 34 30 0d 2a 2a 20 38 30 |* 20.** |40.** 80|
|00000650| 20 5f 50 4d 5f 50 54 52 | 5f 50 41 52 49 54 59 09 | _PM_PTR|_PARITY.|
|00000660| 54 68 69 73 20 69 73 20 | 61 20 70 61 72 69 74 79 |This is |a parity|
|00000670| 20 62 69 74 20 66 6f 72 | 20 64 65 62 75 67 67 69 | bit for| debuggi|
|00000680| 6e 67 2e 0d 2a 2a 0d 2a | 2f 0d 0d 23 64 65 66 69 |ng..**.*|/..#defi|
|00000690| 6e 65 20 5f 50 4d 5f 50 | 54 52 5f 55 53 45 44 09 |ne _PM_P|TR_USED.|
|000006a0| 09 30 78 30 31 0d 23 64 | 65 66 69 6e 65 20 5f 50 |.0x01.#d|efine _P|
|000006b0| 4d 5f 50 54 52 5f 50 41 | 52 49 54 59 09 09 30 78 |M_PTR_PA|RITY..0x|
|000006c0| 38 30 0d 0d 23 64 65 66 | 69 6e 65 20 5f 50 4d 5f |80..#def|ine _PM_|
|000006d0| 4d 49 4e 5f 41 4c 4c 4f | 43 5f 53 49 5a 45 09 38 |MIN_ALLO|C_SIZE.8|
|000006e0| 0d 0d 23 64 65 66 69 6e | 65 09 41 4c 49 47 4e 4d |..#defin|e.ALIGNM|
|000006f0| 45 4e 54 09 09 09 09 34 | 09 09 2f 2a 20 54 68 65 |ENT....4|../* The|
|00000700| 20 36 38 30 32 30 20 6c | 69 6b 65 73 20 74 68 69 | 68020 l|ikes thi|
|00000710| 6e 67 73 20 6c 6f 6e 67 | 20 61 6c 69 67 6e 65 64 |ngs long| aligned|
|00000720| 2e 20 2a 2f 0d 23 64 65 | 66 69 6e 65 20 49 4e 54 |. */.#de|fine INT|
|00000730| 5f 41 4c 49 47 4e 28 69 | 2c 20 72 29 09 09 09 28 |_ALIGN(i|, r)...(|
|00000740| 20 28 28 69 29 20 2b 20 | 28 28 72 29 20 2d 20 31 | ((i) + |((r) - 1|
|00000750| 29 29 20 26 20 7e 28 28 | 72 29 20 2d 20 31 29 20 |)) & ~((|r) - 1) |
|00000760| 29 0d 0d 0d 23 64 65 66 | 69 6e 65 20 53 55 47 47 |)...#def|ine SUGG|
|00000770| 45 53 54 45 44 5f 42 4c | 4b 5f 53 49 5a 45 09 09 |ESTED_BL|K_SIZE..|
|00000780| 33 32 37 36 38 0d 0d 0d | 23 64 65 66 69 6e 65 20 |32768...|#define |
|00000790| 47 45 54 5f 50 54 52 5f | 46 4c 41 47 53 28 68 64 |GET_PTR_|FLAGS(hd|
|000007a0| 72 29 09 5c 0d 09 28 20 | 28 75 5f 6c 6f 6e 67 29 |r).\..( |(u_long)|
|000007b0| 20 28 20 28 28 28 68 64 | 72 29 2d 3e 73 69 7a 65 | ( (((hd|r)->size|
|000007c0| 29 20 3e 3e 20 32 34 29 | 20 26 20 30 78 30 30 30 |) >> 24)| & 0x000|
|000007d0| 30 30 30 46 46 20 29 20 | 29 0d 23 64 65 66 69 6e |000FF ) |).#defin|
|000007e0| 65 20 53 45 54 5f 50 54 | 52 5f 55 53 45 44 28 68 |e SET_PT|R_USED(h|
|000007f0| 64 72 29 09 5c 0d 09 28 | 20 28 68 64 72 29 2d 3e |dr).\..(| (hdr)->|
|00000800| 73 69 7a 65 20 7c 3d 20 | 28 28 28 5f 50 4d 5f 50 |size |= |(((_PM_P|
|00000810| 54 52 5f 55 53 45 44 29 | 20 3c 3c 20 32 34 29 20 |TR_USED)| << 24) |
|00000820| 26 20 30 78 46 46 30 30 | 30 30 30 30 29 20 29 0d |& 0xFF00|0000) ).|
|00000830| 23 64 65 66 69 6e 65 20 | 53 45 54 5f 50 54 52 5f |#define |SET_PTR_|
|00000840| 46 52 45 45 28 68 64 72 | 29 09 5c 0d 09 28 20 28 |FREE(hdr|).\..( (|
|00000850| 68 64 72 29 2d 3e 73 69 | 7a 65 20 26 3d 20 7e 28 |hdr)->si|ze &= ~(|
|00000860| 28 28 5f 50 4d 5f 50 54 | 52 5f 55 53 45 44 29 20 |((_PM_PT|R_USED) |
|00000870| 3c 3c 20 32 34 29 20 26 | 20 30 78 46 46 30 30 30 |<< 24) &| 0xFF000|
|00000880| 30 30 30 29 20 29 0d 23 | 64 65 66 69 6e 65 20 49 |000) ).#|define I|
|00000890| 53 5f 50 54 52 5f 55 53 | 45 44 28 68 64 72 29 09 |S_PTR_US|ED(hdr).|
|000008a0| 5c 0d 09 28 20 28 47 45 | 54 5f 50 54 52 5f 46 4c |\..( (GE|T_PTR_FL|
|000008b0| 41 47 53 28 68 64 72 29 | 20 26 20 5f 50 4d 5f 50 |AGS(hdr)| & _PM_P|
|000008c0| 54 52 5f 55 53 45 44 29 | 20 21 3d 20 30 20 29 0d |TR_USED)| != 0 ).|
|000008d0| 23 64 65 66 69 6e 65 20 | 49 53 5f 50 54 52 5f 46 |#define |IS_PTR_F|
|000008e0| 52 45 45 28 68 64 72 29 | 09 5c 0d 09 28 20 28 47 |REE(hdr)|.\..( (G|
|000008f0| 45 54 5f 50 54 52 5f 46 | 4c 41 47 53 28 68 64 72 |ET_PTR_F|LAGS(hdr|
|00000900| 29 20 26 20 5f 50 4d 5f | 50 54 52 5f 55 53 45 44 |) & _PM_|PTR_USED|
|00000910| 29 20 3d 3d 20 30 20 29 | 0d 0d 23 64 65 66 69 6e |) == 0 )|..#defin|
|00000920| 65 20 47 45 54 5f 50 54 | 52 5f 53 49 5a 45 28 68 |e GET_PT|R_SIZE(h|
|00000930| 64 72 29 09 5c 0d 09 28 | 20 28 75 5f 6c 6f 6e 67 |dr).\..(| (u_long|
|00000940| 29 20 28 20 28 28 68 64 | 72 29 2d 3e 73 69 7a 65 |) ( ((hd|r)->size|
|00000950| 29 20 26 20 30 78 30 30 | 46 46 46 46 46 46 20 29 |) & 0x00|FFFFFF )|
|00000960| 20 29 0d 23 64 65 66 69 | 6e 65 20 53 45 54 5f 50 | ).#defi|ne SET_P|
|00000970| 54 52 5f 53 49 5a 45 28 | 68 64 72 2c 20 62 6c 6b |TR_SIZE(|hdr, blk|
|00000980| 73 69 7a 65 29 09 5c 0d | 09 28 20 28 68 64 72 29 |size).\.|.( (hdr)|
|00000990| 2d 3e 73 69 7a 65 20 3d | 20 28 20 28 28 68 64 72 |->size =| ( ((hdr|
|000009a0| 29 2d 3e 73 69 7a 65 20 | 26 20 30 58 46 46 30 30 |)->size |& 0XFF00|
|000009b0| 30 30 30 30 29 20 7c 20 | 28 28 62 6c 6b 73 69 7a |0000) | |((blksiz|
|000009c0| 65 29 20 26 20 30 78 30 | 30 46 46 46 46 46 46 29 |e) & 0x0|0FFFFFF)|
|000009d0| 20 29 20 29 0d 0d 74 79 | 70 65 64 65 66 20 73 74 | ) )..ty|pedef st|
|000009e0| 72 75 63 74 20 7b 0d 09 | 75 5f 6c 6f 6e 67 09 09 |ruct {..|u_long..|
|000009f0| 73 69 7a 65 3b 0d 09 7d | 20 5f 6d 65 6d 5f 70 74 |size;..}| _mem_pt|
|00000a00| 72 5f 68 64 72 2c 20 2a | 5f 6d 65 6d 5f 70 74 72 |r_hdr, *|_mem_ptr|
|00000a10| 5f 68 64 72 5f 70 74 72 | 3b 0d 0d 0d 2f 2a 20 54 |_hdr_ptr|;.../* T|
|00000a20| 68 65 72 65 20 61 72 65 | 20 74 77 6f 20 73 74 6f |here are| two sto|
|00000a30| 72 61 67 65 20 6d 65 74 | 68 6f 64 73 2e 20 42 6c |rage met|hods. Bl|
|00000a40| 6f 63 6b 73 20 73 6d 61 | 6c 6c 65 72 20 74 68 61 |ocks sma|ller tha|
|00000a50| 6e 20 36 34 20 62 79 74 | 65 73 20 61 72 65 20 61 |n 64 byt|es are a|
|00000a60| 6c 6c 6f 63 61 74 65 64 | 0d 20 20 20 66 72 6f 6d |llocated|. from|
|00000a70| 20 61 20 5f 4d 45 4d 5f | 42 55 43 4b 45 54 2c 20 | a _MEM_|BUCKET, |
|00000a80| 6c 61 72 67 65 72 20 62 | 6c 6f 63 6b 73 20 66 72 |larger b|locks fr|
|00000a90| 6f 6d 20 61 20 5f 4d 45 | 4d 5f 42 4c 4b 2e 0d 2a |om a _ME|M_BLK..*|
|00000aa0| 2f 0d 0d 74 79 70 65 64 | 65 66 20 73 74 72 75 63 |/..typed|ef struc|
|00000ab0| 74 20 5f 4d 45 4d 5f 42 | 55 43 4b 45 54 20 7b 0d |t _MEM_B|UCKET {.|
|00000ac0| 09 73 74 72 75 63 74 20 | 5f 4d 45 4d 5f 42 55 43 |.struct |_MEM_BUC|
|00000ad0| 4b 45 54 20 2a 20 6e 65 | 78 74 3b 09 09 09 09 2f |KET * ne|xt;..../|
|00000ae0| 2a 20 4e 65 78 74 20 62 | 75 63 6b 65 74 20 09 09 |* Next b|ucket ..|
|00000af0| 09 09 09 09 09 09 09 09 | 2a 2f 0d 09 73 74 72 75 |........|*/..stru|
|00000b00| 63 74 20 5f 4d 45 4d 5f | 42 55 43 4b 45 54 20 2a |ct _MEM_|BUCKET *|
|00000b10| 20 70 72 65 76 3b 09 09 | 09 09 2f 2a 20 50 72 65 | prev;..|../* Pre|
|00000b20| 76 69 6f 75 73 20 62 75 | 63 6b 65 74 09 09 09 09 |vious bu|cket....|
|00000b30| 09 09 09 09 09 2a 2f 0d | 09 73 74 72 75 63 74 20 |.....*/.|.struct |
|00000b40| 5f 4d 45 4d 5f 50 4f 4f | 4c 20 20 20 2a 20 70 6f |_MEM_POO|L * po|
|00000b50| 6f 6c 3b 09 09 09 09 2f | 2a 20 54 68 65 20 62 75 |ol;..../|* The bu|
|00000b60| 63 6b 65 74 27 73 20 70 | 6f 6f 6c 09 09 09 09 09 |cket's p|ool.....|
|00000b70| 09 09 09 09 2a 2f 0d 09 | 63 68 61 72 20 2a 09 09 |....*/..|char *..|
|00000b80| 09 09 09 6d 65 6d 6f 72 | 79 3b 09 09 09 2f 2a 20 |...memor|y;.../* |
|00000b90| 54 68 65 20 62 75 63 6b | 65 74 27 73 20 61 6c 6c |The buck|et's all|
|00000ba0| 6f 63 61 74 65 64 20 6d | 65 6d 6f 72 79 2e 20 09 |ocated m|emory. .|
|00000bb0| 09 09 09 2a 2f 0d 09 63 | 68 61 72 20 2a 09 09 09 |...*/..c|har *...|
|00000bc0| 09 09 66 72 65 65 3b 09 | 09 09 09 2f 2a 20 46 69 |..free;.|.../* Fi|
|00000bd0| 72 73 74 20 66 72 65 65 | 20 62 6c 6f 63 6b 20 09 |rst free| block .|
|00000be0| 09 09 09 09 09 09 09 09 | 2a 2f 0d 09 73 68 6f 72 |........|*/..shor|
|00000bf0| 74 09 09 09 09 09 09 6d | 61 78 5f 63 6f 75 6e 74 |t......m|ax_count|
|00000c00| 3b 09 09 2f 2a 20 54 6f | 74 61 6c 20 23 20 6f 66 |;../* To|tal # of|
|00000c10| 20 62 6c 6f 63 6b 73 20 | 09 09 09 09 09 09 09 09 | blocks |........|
|00000c20| 2a 2f 0d 09 73 68 6f 72 | 74 09 09 09 09 09 09 66 |*/..shor|t......f|
|00000c30| 72 65 65 5f 63 6f 75 6e | 74 3b 09 09 2f 2a 20 23 |ree_coun|t;../* #|
|00000c40| 20 6f 66 20 66 72 65 65 | 20 62 6c 6f 63 6b 73 20 | of free| blocks |
|00000c50| 69 6e 20 74 68 69 73 20 | 62 75 63 6b 65 74 20 09 |in this |bucket .|
|00000c60| 09 09 09 2a 2f 0d 7d 20 | 5f 6d 65 6d 5f 62 75 63 |...*/.} |_mem_buc|
|00000c70| 6b 65 74 2c 20 2a 5f 6d | 65 6d 5f 62 75 63 6b 65 |ket, *_m|em_bucke|
|00000c80| 74 5f 70 74 72 3b 0d 0d | 74 79 70 65 64 65 66 20 |t_ptr;..|typedef |
|00000c90| 73 74 72 75 63 74 20 5f | 4d 45 4d 5f 42 4c 4b 20 |struct _|MEM_BLK |
|00000ca0| 7b 0d 09 75 5f 6c 6f 6e | 67 09 09 09 09 73 69 7a |{..u_lon|g....siz|
|00000cb0| 65 3b 09 09 09 09 2f 2a | 20 54 68 65 20 73 69 7a |e;..../*| The siz|
|00000cc0| 65 20 6f 66 20 74 68 69 | 73 20 62 6c 6f 63 6b 27 |e of thi|s block'|
|00000cd0| 73 20 6d 65 6d 6f 72 79 | 2e 20 2a 2f 0d 09 63 68 |s memory|. */..ch|
|00000ce0| 61 72 09 09 09 09 09 2a | 6d 65 6d 6f 72 79 3b 09 |ar.....*|memory;.|
|00000cf0| 09 09 2f 2a 20 54 68 65 | 20 62 6c 6f 63 6b 27 73 |../* The| block's|
|00000d00| 20 61 6c 6c 6f 63 61 74 | 65 64 20 6d 65 6d 6f 72 | allocat|ed memor|
|00000d10| 79 2e 20 2a 2f 0d 09 75 | 5f 6c 6f 6e 67 09 09 09 |y. */..u|_long...|
|00000d20| 09 6d 61 78 5f 66 72 65 | 65 3b 09 09 2f 2a 20 54 |.max_fre|e;../* T|
|00000d30| 68 65 20 6d 61 78 69 6d | 75 6d 20 66 72 65 65 20 |he maxim|um free |
|00000d40| 73 69 7a 65 20 69 6e 20 | 74 68 65 20 62 6c 6f 63 |size in |the bloc|
|00000d50| 6b 20 2a 2f 0d 09 73 74 | 72 75 63 74 20 5f 4d 45 |k */..st|ruct _ME|
|00000d60| 4d 5f 42 4c 4b 09 2a 6e | 65 78 74 3b 09 09 09 2f |M_BLK.*n|ext;.../|
|00000d70| 2a 20 54 68 65 20 6e 65 | 78 74 20 62 6c 6f 63 6b |* The ne|xt block|
|00000d80| 20 69 6e 20 74 68 65 20 | 70 6f 6f 6c 20 62 6c 6f | in the |pool blo|
|00000d90| 63 6b 20 6c 69 73 74 2e | 20 2a 2f 0d 09 73 74 72 |ck list.| */..str|
|00000da0| 75 63 74 20 5f 4d 45 4d | 5f 50 4f 4f 4c 09 2a 70 |uct _MEM|_POOL.*p|
|00000db0| 6f 6f 6c 3b 09 09 09 2f | 2a 20 54 68 65 20 62 6c |ool;.../|* The bl|
|00000dc0| 6f 63 6b 27 73 20 70 6f | 6f 6c 2e 20 2a 2f 0d 09 |ock's po|ol. */..|
|00000dd0| 7d 20 5f 6d 65 6d 5f 62 | 6c 6b 2c 20 2a 5f 6d 65 |} _mem_b|lk, *_me|
|00000de0| 6d 5f 62 6c 6b 5f 70 74 | 72 3b 0d 0d 0d 74 79 70 |m_blk_pt|r;...typ|
|00000df0| 65 64 65 66 20 73 74 72 | 75 63 74 20 5f 4d 45 4d |edef str|uct _MEM|
|00000e00| 5f 50 4f 4f 4c 20 7b 0d | 09 69 6e 74 09 09 09 09 |_POOL {.|.int....|
|00000e10| 09 69 64 3b 09 09 09 09 | 2f 2a 20 54 68 65 20 70 |.id;....|/* The p|
|00000e20| 6f 6f 6c 27 73 20 49 44 | 2e 20 09 09 09 09 09 09 |ool's ID|. ......|
|00000e30| 09 2a 2f 0d 09 75 5f 6c | 6f 6e 67 09 09 09 09 70 |.*/..u_l|ong....p|
|00000e40| 72 65 66 5f 62 6c 6b 5f | 73 69 7a 65 3b 09 2f 2a |ref_blk_|size;./*|
|00000e50| 20 54 68 65 20 70 72 65 | 66 65 72 72 65 64 20 73 | The pre|ferred s|
|00000e60| 69 7a 65 20 6f 66 20 6e | 65 77 20 62 6c 6b 73 2e |ize of n|ew blks.|
|00000e70| 09 09 2a 2f 0d 09 5f 6d | 65 6d 5f 62 75 63 6b 65 |..*/.._m|em_bucke|
|00000e80| 74 5f 70 74 72 09 62 6c | 6b 5f 31 36 3b 09 09 09 |t_ptr.bl|k_16;...|
|00000e90| 2f 2a 20 42 6c 6f 63 6b | 73 20 3c 3d 20 31 36 20 |/* Block|s <= 16 |
|00000ea0| 62 79 74 65 73 09 09 09 | 09 09 09 2a 2f 0d 09 5f |bytes...|...*/.._|
|00000eb0| 6d 65 6d 5f 62 75 63 6b | 65 74 5f 70 74 72 09 66 |mem_buck|et_ptr.f|
|00000ec0| 72 65 65 5f 31 36 3b 09 | 09 09 2f 2a 20 42 6c 6f |ree_16;.|../* Blo|
|00000ed0| 63 6b 73 20 3c 3d 20 31 | 36 20 62 79 74 65 73 09 |cks <= 1|6 bytes.|
|00000ee0| 09 09 09 09 09 2a 2f 0d | 09 5f 6d 65 6d 5f 62 75 |.....*/.|._mem_bu|
|00000ef0| 63 6b 65 74 5f 70 74 72 | 09 62 6c 6b 5f 33 32 3b |cket_ptr|.blk_32;|
|00000f00| 09 09 09 2f 2a 20 42 6c | 6f 63 6b 73 20 3c 3d 20 |.../* Bl|ocks <= |
|00000f10| 33 32 20 62 79 74 65 73 | 09 09 09 09 09 09 2a 2f |32 bytes|......*/|
|00000f20| 0d 09 5f 6d 65 6d 5f 62 | 75 63 6b 65 74 5f 70 74 |.._mem_b|ucket_pt|
|00000f30| 72 09 66 72 65 65 5f 33 | 32 3b 09 09 09 2f 2a 20 |r.free_3|2;.../* |
|00000f40| 42 6c 6f 63 6b 73 20 3c | 3d 20 33 32 20 62 79 74 |Blocks <|= 32 byt|
|00000f50| 65 73 09 09 09 09 09 09 | 2a 2f 0d 09 5f 6d 65 6d |es......|*/.._mem|
|00000f60| 5f 62 75 63 6b 65 74 5f | 70 74 72 09 62 6c 6b 5f |_bucket_|ptr.blk_|
|00000f70| 36 34 3b 09 09 09 2f 2a | 20 42 6c 6f 63 6b 73 20 |64;.../*| Blocks |
|00000f80| 3c 3d 20 36 34 20 62 79 | 74 65 73 09 09 09 09 09 |<= 64 by|tes.....|
|00000f90| 09 2a 2f 0d 09 5f 6d 65 | 6d 5f 62 75 63 6b 65 74 |.*/.._me|m_bucket|
|00000fa0| 5f 70 74 72 09 66 72 65 | 65 5f 36 34 3b 09 09 09 |_ptr.fre|e_64;...|
|00000fb0| 2f 2a 20 42 6c 6f 63 6b | 73 20 3c 3d 20 36 34 20 |/* Block|s <= 64 |
|00000fc0| 62 79 74 65 73 09 09 09 | 09 09 09 2a 2f 0d 09 5f |bytes...|...*/.._|
|00000fd0| 6d 65 6d 5f 62 6c 6b 5f | 70 74 72 09 09 62 6c 6b |mem_blk_|ptr..blk|
|00000fe0| 5f 6c 69 73 74 3b 09 09 | 2f 2a 20 54 68 65 20 6c |_list;..|/* The l|
|00000ff0| 69 73 74 20 6f 66 20 62 | 6c 6f 63 6b 73 20 69 6e |ist of b|locks in|
|00001000| 20 74 68 65 20 70 6f 6f | 6c 2e 20 09 09 2a 2f 0d | the poo|l. ..*/.|
|00001010| 09 73 74 72 75 63 74 20 | 5f 4d 45 4d 5f 50 4f 4f |.struct |_MEM_POO|
|00001020| 4c 09 2a 6e 65 78 74 3b | 09 09 09 2f 2a 20 54 68 |L.*next;|.../* Th|
|00001030| 65 20 6e 65 78 74 20 70 | 6f 6f 6c 20 69 6e 20 74 |e next p|ool in t|
|00001040| 68 65 20 66 6f 72 65 73 | 74 2e 20 09 09 09 2a 2f |he fores|t. ...*/|
|00001050| 0d 23 69 66 64 65 66 20 | 5f 50 4d 5f 53 54 41 54 |.#ifdef |_PM_STAT|
|00001060| 53 0d 09 75 5f 6c 6f 6e | 67 09 09 09 09 74 6f 74 |S..u_lon|g....tot|
|00001070| 61 6c 5f 6d 65 6d 6f 72 | 79 3b 09 2f 2a 20 54 68 |al_memor|y;./* Th|
|00001080| 65 20 74 6f 74 61 6c 20 | 61 6c 6c 6f 63 61 74 65 |e total |allocate|
|00001090| 64 20 6d 65 6d 6f 72 79 | 20 62 79 20 74 68 69 73 |d memory| by this|
|000010a0| 20 70 6f 6f 6c 20 2a 2f | 0d 09 75 5f 6c 6f 6e 67 | pool */|..u_long|
|000010b0| 09 09 09 09 74 6f 74 61 | 6c 5f 73 74 6f 72 61 67 |....tota|l_storag|
|000010c0| 65 3b 09 2f 2a 20 54 68 | 65 20 74 6f 74 61 6c 20 |e;./* Th|e total |
|000010d0| 6d 61 6c 6c 6f 63 2d 61 | 62 6c 65 20 73 74 6f 72 |malloc-a|ble stor|
|000010e0| 61 67 65 20 69 6e 20 74 | 68 69 73 20 70 6f 6f 6c |age in t|his pool|
|000010f0| 20 2a 2f 0d 09 75 5f 6c | 6f 6e 67 09 09 09 09 74 | */..u_l|ong....t|
|00001100| 6f 74 61 6c 5f 6d 61 6c | 6c 6f 63 3b 09 2f 2a 20 |otal_mal|loc;./* |
|00001110| 54 68 65 20 74 6f 74 61 | 6c 20 6d 61 6c 6c 6f 63 |The tota|l malloc|
|00001120| 2d 65 64 20 73 74 6f 72 | 61 67 65 20 6e 6f 74 20 |-ed stor|age not |
|00001130| 66 72 65 65 64 2e 20 2a | 2f 0d 09 75 5f 6c 6f 6e |freed. *|/..u_lon|
|00001140| 67 09 09 09 09 6d 61 78 | 5f 62 6c 6b 5f 73 69 7a |g....max|_blk_siz|
|00001150| 65 3b 09 2f 2a 20 54 68 | 65 20 6d 61 78 69 6d 75 |e;./* Th|e maximu|
|00001160| 6d 20 62 6c 6f 63 6b 20 | 73 69 7a 65 20 61 6c 6c |m block |size all|
|00001170| 6f 63 61 74 65 64 2e 20 | 2a 2f 0d 09 66 6c 6f 61 |ocated. |*/..floa|
|00001180| 74 09 09 09 09 09 61 76 | 65 5f 72 65 71 5f 73 69 |t.....av|e_req_si|
|00001190| 7a 65 3b 09 2f 2a 20 54 | 68 65 20 61 76 65 20 61 |ze;./* T|he ave a|
|000011a0| 6c 6c 6f 63 61 74 65 64 | 20 72 65 71 75 65 73 74 |llocated| request|
|000011b0| 20 73 69 7a 65 20 2a 2f | 0d 09 75 5f 6c 6f 6e 67 | size */|..u_long|
|000011c0| 09 09 09 09 61 76 65 5f | 72 65 71 5f 74 6f 74 61 |....ave_|req_tota|
|000011d0| 6c 3b 09 2f 2a 20 54 68 | 65 20 74 6f 74 61 6c 20 |l;./* Th|e total |
|000011e0| 72 65 71 75 65 73 74 73 | 20 69 6e 20 74 68 65 20 |requests| in the |
|000011f0| 61 76 65 72 61 67 65 2e | 20 2a 2f 0d 09 66 6c 6f |average.| */..flo|
|00001200| 61 74 09 09 09 09 09 61 | 76 65 5f 62 6c 6b 5f 73 |at.....a|ve_blk_s|
|00001210| 69 7a 65 3b 09 2f 2a 20 | 54 68 65 20 61 76 65 20 |ize;./* |The ave |
|00001220| 73 61 6c 6c 6f 63 61 74 | 65 64 20 62 6c 6b 20 73 |sallocat|ed blk s|
|00001230| 69 7a 65 20 2a 2f 0d 09 | 75 5f 6c 6f 6e 67 09 09 |ize */..|u_long..|
|00001240| 09 09 61 76 65 5f 62 6c | 6b 5f 74 6f 74 61 6c 3b |..ave_bl|k_total;|
|00001250| 09 2f 2a 20 54 68 65 20 | 74 6f 74 61 6c 20 62 6c |./* The |total bl|
|00001260| 6b 73 20 69 6e 20 74 68 | 65 20 61 76 65 72 61 67 |ks in th|e averag|
|00001270| 65 2e 20 2a 2f 0d 23 65 | 6e 64 69 66 0d 09 7d 20 |e. */.#e|ndif..} |
|00001280| 5f 6d 65 6d 5f 70 6f 6f | 6c 2c 20 2a 5f 6d 65 6d |_mem_poo|l, *_mem|
|00001290| 5f 70 6f 6f 6c 5f 70 74 | 72 3b 0d 0d 0d 0d 73 74 |_pool_pt|r;....st|
|000012a0| 61 74 69 63 20 5f 6d 65 | 6d 5f 70 6f 6f 6c 09 5f |atic _me|m_pool._|
|000012b0| 6d 65 6d 5f 73 79 73 74 | 65 6d 5f 70 6f 6f 6c 20 |mem_syst|em_pool |
|000012c0| 3d 20 7b 0d 09 30 2c 09 | 09 09 09 09 09 2f 2a 20 |= {..0,.|...../* |
|000012d0| 69 64 20 2a 2f 0d 09 53 | 55 47 47 45 53 54 45 44 |id */..S|UGGESTED|
|000012e0| 5f 42 4c 4b 5f 53 49 5a | 45 2c 09 09 2f 2a 20 70 |_BLK_SIZ|E,../* p|
|000012f0| 72 65 66 5f 62 6c 6b 5f | 73 69 7a 65 20 2a 2f 0d |ref_blk_|size */.|
|00001300| 09 30 2c 09 09 09 09 09 | 09 2f 2a 20 62 6c 6b 5f |.0,.....|./* blk_|
|00001310| 6c 69 73 74 20 2a 2f 0d | 09 30 2c 09 09 09 09 09 |list */.|.0,.....|
|00001320| 09 2f 2a 20 6e 65 78 74 | 20 2a 2f 0d 23 69 66 64 |./* next| */.#ifd|
|00001330| 65 66 20 5f 50 4d 5f 53 | 54 41 54 53 0d 09 30 2c |ef _PM_S|TATS..0,|
|00001340| 09 09 09 09 09 09 2f 2a | 20 74 6f 74 61 6c 5f 6d |....../*| total_m|
|00001350| 65 6d 6f 72 79 20 2a 2f | 0d 09 30 2c 09 09 09 09 |emory */|..0,....|
|00001360| 09 09 2f 2a 20 74 6f 74 | 61 6c 5f 73 74 6f 72 61 |../* tot|al_stora|
|00001370| 67 65 20 2a 2f 0d 09 30 | 2c 09 09 09 09 09 09 2f |ge */..0|,....../|
|00001380| 2a 20 74 6f 74 61 6c 5f | 6d 61 6c 6c 6f 63 20 2a |* total_|malloc *|
|00001390| 2f 0d 09 30 2c 09 09 09 | 09 09 09 2f 2a 20 6d 61 |/..0,...|.../* ma|
|000013a0| 78 5f 62 6c 6b 5f 73 69 | 7a 65 20 2a 2f 0d 09 30 |x_blk_si|ze */..0|
|000013b0| 2e 30 2c 09 09 09 09 09 | 2f 2a 20 61 76 65 5f 72 |.0,.....|/* ave_r|
|000013c0| 65 71 5f 73 69 7a 65 20 | 2a 2f 0d 09 30 2c 09 09 |eq_size |*/..0,..|
|000013d0| 09 09 09 09 2f 2a 20 61 | 76 65 5f 72 65 71 5f 74 |..../* a|ve_req_t|
|000013e0| 6f 74 61 6c 20 2a 2f 0d | 09 30 2e 30 2c 09 09 09 |otal */.|.0.0,...|
|000013f0| 09 09 2f 2a 20 61 76 65 | 5f 62 6c 6b 5f 73 69 7a |../* ave|_blk_siz|
|00001400| 65 20 2a 2f 0d 09 30 2c | 09 09 09 09 09 09 2f 2a |e */..0,|....../*|
|00001410| 20 61 76 65 5f 62 6c 6b | 5f 74 6f 74 61 6c 20 2a | ave_blk|_total *|
|00001420| 2f 0d 23 65 6e 64 69 66 | 0d 09 7d 3b 0d 0d 2f 2a |/.#endif|..};../*|
|00001430| 0d 2a 2a 20 54 68 65 20 | 6d 65 6d 6f 72 79 20 70 |.** The |memory p|
|00001440| 6f 6f 6c 20 66 6f 72 65 | 73 74 2e 20 54 6f 20 74 |ool fore|st. To t|
|00001450| 68 65 20 75 73 65 72 2c | 20 74 68 69 73 20 69 73 |he user,| this is|
|00001460| 20 73 69 6d 70 6c 79 20 | 61 20 64 69 73 6a 6f 69 | simply |a disjoi|
|00001470| 6e 74 0d 2a 2a 20 67 72 | 6f 75 70 20 6f 66 20 6d |nt.** gr|oup of m|
|00001480| 65 6d 6f 72 79 20 70 6f | 6f 6c 73 2c 20 69 6e 20 |emory po|ols, in |
|00001490| 77 68 69 63 68 20 68 69 | 73 20 6d 65 6d 6f 72 79 |which hi|s memory|
|000014a0| 20 70 6f 6f 6c 73 20 6c | 69 65 2e 20 57 65 20 6b | pools l|ie. We k|
|000014b0| 65 65 70 0d 2a 2a 20 69 | 74 20 61 73 20 61 20 73 |eep.** i|t as a s|
|000014c0| 69 6d 70 6c 65 20 6c 69 | 6e 6b 65 64 20 6c 69 73 |imple li|nked lis|
|000014d0| 74 2e 20 46 6f 72 77 61 | 72 64 20 6c 69 6e 6b 65 |t. Forwa|rd linke|
|000014e0| 64 2c 20 6e 6f 74 68 69 | 6e 67 20 66 61 6e 63 79 |d, nothi|ng fancy|
|000014f0| 2e 0d 2a 2a 0d 2a 2a 20 | 54 68 65 20 64 65 66 61 |..**.** |The defa|
|00001500| 75 6c 74 20 70 6f 6f 6c | 20 69 73 20 73 69 6d 70 |ult pool| is simp|
|00001510| 6c 79 20 74 68 65 20 66 | 72 6f 6e 74 20 70 6f 6f |ly the f|ront poo|
|00001520| 6c 20 69 6e 20 74 68 65 | 20 70 6f 6f 6c 20 66 6f |l in the| pool fo|
|00001530| 72 65 73 74 20 6c 69 73 | 74 2e 0d 2a 2f 0d 5f 6d |rest lis|t..*/._m|
|00001540| 65 6d 5f 70 6f 6f 6c 5f | 70 74 72 09 09 09 09 5f |em_pool_|ptr...._|
|00001550| 6d 65 6d 5f 70 6f 6f 6c | 5f 66 6f 72 65 73 74 20 |mem_pool|_forest |
|00001560| 3d 20 26 20 5f 6d 65 6d | 5f 73 79 73 74 65 6d 5f |= & _mem|_system_|
|00001570| 70 6f 6f 6c 3b 0d 0d 23 | 64 65 66 69 6e 65 20 5f |pool;..#|define _|
|00001580| 64 65 66 61 75 6c 74 5f | 6d 65 6d 5f 70 6f 6f 6c |default_|mem_pool|
|00001590| 09 5f 6d 65 6d 5f 70 6f | 6f 6c 5f 66 6f 72 65 73 |._mem_po|ol_fores|
|000015a0| 74 0d 0d 0d 63 68 61 72 | 09 09 09 09 2a 6d 61 6c |t...char|....*mal|
|000015b0| 6c 6f 63 28 29 3b 0d 63 | 68 61 72 09 09 09 09 2a |loc();.c|har....*|
|000015c0| 5f 70 6f 6f 6c 5f 6d 61 | 6c 6c 6f 63 28 29 3b 0d |_pool_ma|lloc();.|
|000015d0| 5f 6d 65 6d 5f 62 6c 6b | 5f 70 74 72 09 09 5f 70 |_mem_blk|_ptr.._p|
|000015e0| 6f 6f 6c 5f 6e 65 77 5f | 62 6c 6b 28 29 3b 0d 5f |ool_new_|blk();._|
|000015f0| 6d 65 6d 5f 62 6c 6b 5f | 70 74 72 09 09 5f 70 6f |mem_blk_|ptr.._po|
|00001600| 6f 6c 5f 66 69 6e 64 5f | 66 72 65 65 5f 62 6c 6b |ol_find_|free_blk|
|00001610| 28 29 3b 0d 5f 6d 65 6d | 5f 62 6c 6b 5f 70 74 72 |();._mem|_blk_ptr|
|00001620| 09 09 5f 70 6f 6f 6c 5f | 66 69 6e 64 5f 70 74 72 |.._pool_|find_ptr|
|00001630| 5f 62 6c 6b 28 29 3b 0d | 5f 6d 65 6d 5f 70 74 72 |_blk();.|_mem_ptr|
|00001640| 5f 68 64 72 5f 70 74 72 | 09 5f 62 6c 6b 5f 66 69 |_hdr_ptr|._blk_fi|
|00001650| 6e 64 5f 66 72 65 65 5f | 68 64 72 28 29 3b 0d 5f |nd_free_|hdr();._|
|00001660| 6d 65 6d 5f 70 6f 6f 6c | 5f 70 74 72 09 09 66 69 |mem_pool|_ptr..fi|
|00001670| 6e 64 5f 70 6f 6f 6c 28 | 29 3b 0d 5f 6d 65 6d 5f |nd_pool(|);._mem_|
|00001680| 70 6f 6f 6c 5f 70 74 72 | 09 09 6e 65 77 5f 6d 61 |pool_ptr|..new_ma|
|00001690| 6c 6c 6f 63 5f 70 6f 6f | 6c 28 29 3b 0d 69 6e 74 |lloc_poo|l();.int|
|000016a0| 09 09 09 09 09 73 65 74 | 5f 64 65 66 61 75 6c 74 |.....set|_default|
|000016b0| 5f 70 6f 6f 6c 28 29 3b | 09 0d 00 00 00 00 00 00 |_pool();|........|
|000016c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000016d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000016e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000016f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001700| 00 00 01 00 00 00 01 6e | 00 00 00 6e 00 00 00 3e |.......n|...n...>|
|00001710| 6f 61 74 09 09 09 09 61 | 76 65 5f 75 73 65 64 5f |oat....a|ve_used_|
|00001720| 73 69 7a 65 2c 20 61 76 | 65 5f 66 72 65 65 5f 73 |size, av|e_free_s|
|00001730| 0b 69 63 65 6d 61 6c 6c | 6f 63 2e 68 02 00 00 00 |.icemall|oc.h....|
|00001740| 54 45 58 54 4d 50 53 20 | 01 00 ff ff ff ff 00 00 |TEXTMPS |........|
|00001750| 00 00 54 45 58 54 4d 50 | 53 20 01 00 ff ff ff ff |..TEXTMP|S ......|
|00001760| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001770| 00 00 a8 ee 27 84 00 00 | 16 3a 00 00 01 ac 6c 65 |....'...|.:....le|
|00001780| 2c 20 22 50 4f 4f 4c 20 | 53 54 41 54 49 53 54 49 |, "POOL |STATISTI|
|00001790| 43 53 20 46 4f 52 20 49 | 44 23 25 64 20 40 20 78 |CS FOR I|D#%d @ x|
|000017a0| 25 6c 78 20 62 6c 6b 5f | 6c 69 73 74 20 78 25 6c |%lx blk_|list x%l|
|000017b0| 78 20 70 72 65 66 5f 62 | 6c 6b 5f 73 69 7a 65 20 |x pref_b|lk_size |
|000017c0| 25 6c 64 5c 6e 22 2c 0d | 09 09 09 70 6f 6f 6c 2d |%ld\n",.|...pool-|
|000017d0| 3e 69 64 2c 20 70 6f 6f | 6c 2c 20 70 6f 6f 6c 2d |>id, poo|l, pool-|
|000017e0| 3e 62 6c 6b 5f 6c 69 73 | 74 2c 20 70 6f 6f 6c 2d |>blk_lis|t, pool-|
|000017f0| 3e 70 72 65 66 5f 62 6c | 6b 5f 73 69 7a 65 29 3b |>pref_bl|k_size);|
|00001800| 00 00 00 48 00 09 4d 6f | 6e 61 63 6f 00 01 b0 ae |...H..Mo|naco....|
|00001810| 00 14 66 00 01 90 4a ae | 00 18 67 48 3d 6e ff e8 |..f...J.|..gH=n..|
|00001820| ff f0 3d 6e ff e4 00 06 | 00 03 00 30 00 1a 01 a9 |..=n....|...0....|
|00001830| 02 3b 00 64 00 1c 01 dd | 02 3d a9 c2 16 8a 00 00 |.;.d....|.=......|
|00001840| 0a 22 00 00 0a 22 00 00 | 0d 6b 01 00 00 00 00 1e |."..."..|.k......|
|00001850| 00 30 00 1a 01 a9 02 3b | 00 64 00 1c 01 dd 02 3d |.0.....;|.d.....=|
|00001860| 00 00 0d 6b 00 00 00 00 | 00 00 00 00 00 00 00 00 |...k....|........|
|00001870| 01 00 00 00 01 6e 00 00 | 00 6e 00 00 00 3e 00 52 |.....n..|.n...>.R|
|00001880| b7 2c 18 3e 00 00 00 1c | 00 3e 00 00 4d 50 53 52 |.,.>....|.>..MPSR|
|00001890| 00 01 00 0a 03 ed ff ff | 00 00 00 00 00 00 00 00 |........|........|
|000018a0| 03 f0 ff ff 00 00 00 4c | 00 55 0c 2c 00 00 00 00 |.......L|.U.,....|
|000018b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000018c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000018d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000018e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000018f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+